package com.ruoyi.system.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.ruoyi.system.domain.SysTenantApplication;
import org.apache.ibatis.annotations.Param;

/**
 * 租户子系统中间Mapper接口
 * 
 * @author kuaidou
 * @date 2021-08-23
 */
public interface SysTenantApplicationMapper 
{
    /**
     * 查询租户子系统中间
     * 
     * @param tenantCode 租户子系统中间主键
     * @return 租户子系统中间
     */
    public List<SysTenantApplication> selectSysTenantApplicationByTenantCode(String tenantCode);

    /**
     * 查询租户子系统中间列表
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 租户子系统中间集合
     */
    public List<SysTenantApplication> selectSysTenantApplicationList(SysTenantApplication sysTenantApplication);

    /**
     * 新增租户子系统中间
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 结果
     */
    public int insertSysTenantApplication(SysTenantApplication sysTenantApplication);

    /**
     * 修改租户子系统中间
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 结果
     */
    public int updateSysTenantApplication(SysTenantApplication sysTenantApplication);

    /**
     * 删除租户子系统中间
     * 
     * @param tenantCode 租户子系统中间主键
     * @return 结果
     */
    public int deleteSysTenantApplicationByTenantCode(String tenantCode);

    /**
     * 批量删除租户子系统中间
     * 
     * @param tenantCodes 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysTenantApplicationByTenantCodes(String[] tenantCodes);

    /**
     * 添加关联租户关联系统
     *
     * @param tenantCode    租户编号
     * @param appCodeMaps   系统编号天数对应集合
     * @return
     */
    public int batchTenantApplication(@Param("tenantCode") String tenantCode,  @Param("appCodeMaps") Map<String, Date> appCodeMaps);

    /**
     * 根据租户编码删除子系统关联
     *
     * @param tenantCode
     * @return
     */
    public Boolean deleteTenantApplicationByTenantCode(@Param("tenantCode") String tenantCode, @Param("appCode") String appCode);
}